#include "jae.h"

int main( int argc, char* argv[] )
{
    int exitValue = 0;
    
    //Init Engine
    QApplication* pApp = jae::initEngine(argc, argv);
    
    //Create SceneManager
    jae::SceneManager* pSceneManager = new jae::SceneManager();
    pSceneManager->loadSceneFromFile("data/TerrainScene.scn");
    
    //TODO das festhalten der Maus (beim drehen) muss einstellbar sein. bzw hier aufgerufen werden!
    
    //Create example window
    jae::GLWidget* pWindow = new jae::GLWidgetTest(pSceneManager, NULL); 
    pWindow->setWindowTitle("JustAnotherEngine Example01");
    pWindow->showFPS();

    //without Fullscreen:
    pWindow->resize(1024, 768); //or SetFixedSize(...)
    pWindow->show();
    
    //Fullscreen:
    //(The method "setFixedSize(1024, 768)" is needless here, because it's already done in "setScreenResolution()")
    //jae::setScreenResolution(1024, 768, 32);
    //pWindow->showFullScreen();
    
    //start the application
    exitValue = pApp->exec();

    //Shutdown Engine
    delete pSceneManager;
    delete pWindow;
    jae::closeEngine();

    return exitValue;
}
